package com.baofengtv.wake;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.baofengtv.wake.ui.ThirdRiLiActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button button = (Button)findViewById(R.id.start);
        Button button1 = (Button)findViewById(R.id.thirdpart);
        button.setOnClickListener(this);
        button1.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
//        if(v.getId()==R.id.start){
//
//        }
        switch (v.getId()){
            case R.id.start:
                startService(new Intent(this,MyService.class));
                break;
            case R.id.thirdpart:
                startActivity(new Intent(this, ThirdRiLiActivity.class));
        }
    }
}
